﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - Mon application ASP.NET</title>
        @Styles.Render("~/Content/css")
        @Scripts.Render("~/bundles/modernizr")
        @*@Styles.Render("~/Theme/CasualBusiness/css")
        @Scripts.Render("~/bundles/Theme/CasualBusiness")*@
</head>
<body>
    @RenderSection("topLevel", required: false)
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("MVCBootStrapShell_WithTheme", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">              
                    @Html.Partial("_MenuPartial")
                    @Html.Partial("_LoginPartial")
            </div>
        </div>
    </div>
    <div class="container body-content">
        @{ Html.RenderPartial("_Alerts"); }
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
        </footer>
    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @*@{
        var theme = Session["CssTheme"] as string ?? Bootstrap.Theme.Stock;
    }*@
    @{
        var theme = Bootstrap.Theme.Stock;
        if (User.Identity.IsAuthenticated)
        {
            var userStore = new UserStore<ApplicationUser>(new ApplicationDbContext());
            var manager = new UserManager<ApplicationUser>(userStore);
            var user = manager.FindById(User.Identity.GetUserId());
            theme = user.CssTheme ?? theme;
        }
        @Styles.Render(Bootstrap.Bundle(theme))
    }

    @Styles.Render(Bootstrap.Bundle(theme))
    @RenderSection("scripts", required: false)

    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
    
    <script>
    $(function () {
        $("#add-skill").click(function () {
            // get the value of the added skill
            var skill = $("#skill").val();

            // push hidden input to our form
            $("#skills-wrapper").append($("<input type='hidden' name='Skills' value='" + skill + "' />"));

            // add list item for display purposes
            $("#skills-list").append($("<li class='list-group-item'>" + skill + "</li>"));

            // reset the form
            $("#skill").val("").focus();
        });
    });
    </script>
</body>
</html>
